package com.huawei.updatesdk.service.d.a;

import com.huawei.updatesdk.a.b.d.a.a;
import com.huawei.updatesdk.a.b.d.a.d;
import com.huawei.updatesdk.service.a.e;

public class c {
    public static d a(com.huawei.updatesdk.a.b.d.a.c cVar) {
        return new d(cVar, null).a();
    }

    public static d a(e eVar, a aVar) {
        d dVar = new d(eVar, aVar);
        a(dVar, eVar);
        return dVar;
    }

    private static void a(d dVar, e eVar) {
        com.huawei.updatesdk.a.a.b.a.a.a.a("StoreAgent", "executeTask, ActiveCount:" + e.a.getActiveCount() + ", TaskCount:" + e.a.getTaskCount());
        if (eVar.h()) {
            dVar.a(e.b);
        } else {
            dVar.a(e.a);
        }
    }
}
